﻿

////添加信息
//var fnCustomAdd = function () {

//    document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "";
//    //SetDWH(const_EditWindowWidth, const_EditWindowHeight, YAHOO.example.container.dialog1);
//    YAHOO.example.container.dialog1.show();
//}

////修改信息
//var fnCustomEdit = function () {
//    var recordID = myDataTable.getSelectedRows()[0];
//    record = myDataTable.getRecord(recordID);
//    if (record == null) {
//        alert("请选择一条记录");
//        return;
//    }
//    //const_EditEntity = "wkMachine";
//    //document.getElementById("dialog1_h").innerHTML = "修改考勤机—" + record._oData["MachineName"];
//    document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&id=" + record.getData(const_entityID);
//    //SetDWH(550, 480, YAHOO.example.container.dialog1);
//    YAHOO.example.container.dialog1.show();
//}

///// ---------------------------------------------
/////
///// ---------------------------------------------



//添加信息
var fnCustomAdd = function () {
    //const_EditEntity = "hrEmployee";
    var pagetitle = "新增";
    //parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&type=1"));
    parent.NeedRefreshPage = this;
}



//修改信息
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    var pagetitle = "修改记录—" + record.getData("ProductName");
    //parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&id=" + record.getData(const_entityID) + "&type=1"));
    parent.NeedRefreshPage = this;
}